<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- Use IE7 mode -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7 charset={$charset}" />
<meta http-equiv="Content-Type" content="text/html; charset={$charset}" />
{$page_seo}
<link href="{res file=css/style.css}" type="text/css" rel="stylesheet" />
<style>
.tab-frame th {background-color:#FFFFFF; font-size:16px; padding:5px;}
table {width:600px; margin:0; padding:0;}
table td.center {text-align:center;}
.border-top {border-top:1px solid #333333;}
.border-right {border-right:1px solid #333333;}
.border-bottom {border-bottom:1px solid #333333;}
.border-left {border-left:1px solid #333333;}
.border {border:1px solid #333333;}
</style>
</head>
<body style="padding:0;">
<div class="tab-frame" style="padding:0;">
<table cellspacing="0" cellpadding="0" id="tab1" border="0">
	<tr>
		<th colspan="2">采购单</th>
	</tr>
	<tr>
		<td class="tab-align-l">采购单号：</td>
		<td class="tab-align-l" style="width:515px;">{$sourcing_task.list_sn|escape}</td>
	</tr>
	<!--{if $sourcing_task.type == 1}-->
	<tr>
		<td class="tab-align-l">样板号：</td>
		<td class="tab-align-l">{$sourcing_task.sample_sn|escape}</td>
	</tr>
	<!--{else}-->
	<tr>
		<td class="tab-align-l">订单号：</td>
		<td class="tab-align-l">{$sourcing_task.order_sn|escape}</td>
	</tr>
	<!--{/if}-->
	<tr>
		<td class="tab-align-l">到板日期：</td>
		<td class="tab-align-l">{$sourcing_task.arrival_date|date:Y-m-d}</td>
	</tr>
	<tr>
		<td class="tab-align-l">跟单：</td>
		<td class="tab-align-l">{$sourcing_task.user_name|escape}</td>
	</tr>
	<tr>
		<td colspan="2" style="padding:0;">
			<table cellpadding="0" cellspacing="0" id="tab2" border="0">
				<tr>
					<td colspan="4" class="center">采购内容</td>
				</tr>
				<tr>
					<td width="24" class="center">序号</td>
					<td width="159" class="center">采购内容</td>
					<td width="159" class="center">面料信息</td>
					<td width="159" class="center">布行/档口</td>
				</tr>
				<!--{foreach from=$sourcing_task.item item=item name=i}-->
				<tr>
					<td class="center">{$smarty.foreach.i.iteration}</td>
					<td><!--{if !$item.sourcing_info}-->&nbsp;<!--{/if}-->{$item.sourcing_info|escape}</td>
					<td><!--{if !$item.fabric_info}-->&nbsp;<!--{/if}-->{$item.fabric_info|escape}</td>
					<td><!--{if !$item.fabric_shop_name}-->&nbsp;<!--{/if}-->{$item.fabric_shop_name|escape}</td>
				</tr>
				<!--{/foreach}-->
			</table>
		</td>
	</tr>
	<tr>
		<td colspan="2" class="center"><input type="button" value="打印" class="btn-2" onClick="this.parentNode.parentNode.style.display='none';window.print();" /></td>
	</tr>
</table>
</div>
<script type="text/javascript" language="javascript">
var tab1 = document.getElementById('tab1');
var rows1 = tab1.rows;
for (var i = 0; i < rows1.length; i++) {
	var child = rows1[i].cells;
	for (var j = 0; j < child.length; j++) {
		if (i == 0 && j == 0) {
			child[j].className += ' border';
		} else if (i == 0 && j != 0) {
			child[j].className += ' border-top border-right border-bottom';
		} else if (i != 0 && j == 0) {
			child[j].className += ' border-right border-bottom border-left';
		} else {
			child[j].className += ' border-right border-bottom';
		}
	}
}
var tab2 = document.getElementById('tab2');
var rows2 = tab2.rows;
for (var i = 0; i < rows2.length; i++) {
	var child = rows2[i].cells;
	for (var j = 0; j < child.length; j++) {
		if (i == rows2.length - 1 || i != 0) {
			child[j].className += ' border-top';
		}
		if (j != 0) {
			child[j].className += ' border-left';
		}
	}
}
</script>
</body>
</html>